package collection;

import java.util.Arrays;
import java.util.List;

public class ArrayToList {
    public static void main(String[] args) {
        String[] array = {"a", "b", "c", "d", "e"};
        System.out.println("array:"+ Arrays.toString(array));

        List<String> list = Arrays.asList(array);
        System.out.println("list:"+list);

        array[1] = "f";
        System.out.println("array:"+ Arrays.toString(array));
        System.out.println("list:"+list);

        list.set(0, "g");
        System.out.println("array:"+ Arrays.toString(array));
        System.out.println("list:"+list);

    }
}
